package nancal.mp.mvc.dev


import nancal.mp.db.mongo.BaseServiceEnum
import nancal.mp.model.DepItem
import nbcp.base.annotation.mvc.OpenAction
import nbcp.base.comm.ApiResult
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

/**
 * Created by udi on 17-3-19.
 */
@RestController
@OpenAction
class DependencyController {

    //返回依赖信息接口
    @GetMapping("/dependency-services")
    fun getDependency(): ApiResult<DepItem> {

        val dependency = ApiResult<DepItem>()
        val depItem = DepItem()

        depItem.base = mutableListOf(BaseServiceEnum.mongo, BaseServiceEnum.redis, BaseServiceEnum.minio)
        depItem.services = mutableListOf("")
        depItem.extenals = mutableListOf("ali-oss", "ali-sms")

        dependency.data = depItem

        return dependency
    }
}